//
//  PrivateChatList.swift
//  QCFM2
//
//  Created by iMac on 16/1/9.
//  Copyright © 2016年 kuai. All rights reserved.
//

import Foundation
import UIKit
import Alamofire

class PrivateChatList: UITableViewCell {
    
    @IBOutlet weak var PlatNumber: UILabel!
    @IBOutlet weak var PortailUrl: UIImageView!
    @IBOutlet weak var MsgText: UILabel!
    @IBOutlet weak var TimeText: UILabel!
    
    var BaseimageUrl = "http://imgfm.qichexiaozi.com/"
    
    func configurateTheCell(message: Message) {
        let imageUrl = BaseimageUrl + message.PortailUrlStr
        
        self.PlatNumber?.text = message.PlatNumberStr
        
        Alamofire.request(.GET, imageUrl).response() {
            (_, _, data, _) in
            self.PortailUrl.image = UIImage(data: data! as NSData)
        }
        
        //self.PortailUrl.image = UIImage(named: message.PortailUrlStr)
        self.MsgText.text = message.MsgTextStr
        self.TimeText.text = message.TimeTextStr
    }
    
}
